#-*- coding: utf-8 -*-
import os, sys, os.path

VERSION = '0.001'

LOCAL = False
DEBUG = True
TEMPLATE_DEBUG = DEBUG

APPEND_SLASH = True

ROOT_PATH = os.path.dirname(__file__)

if LOCAL:
    BASE_URL = 'http://localhost:8080'
    DOMAIN = 'localhost'
else:
    BASE_URL = 'http://www.3kkk.me'
    DOMAIN = 'www.3kkk.me'

BLOG_AUTHOR = "3kkk-me"
BLOG_TITLE = "3kkk-me's self-inspection"
BLOG_DESC = u"我的心随风飘荡，抓不住你我"

ADMINS = (
    ('perol.chen', 'perol.chen@gmail.com'),
)

MANAGERS = ADMINS

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'Asia/Shanghai'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'zh-cn'

SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = False

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ROOT_PATH + "/static/"

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = BASE_URL + '/static'

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'

# Make this unique, and don't share it with anybody.
SECRET_KEY = '-nc*k(=13$ak$&sc_#2fu$9p_vwt(ckv=hy*0qr(4%jrr)ceap'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.request',
    'django.core.context_processors.media',
    'common.context_processors.bind_settings',
)

MIDDLEWARE_CLASSES = (
    'common.domain_trans.Domain_transMiddleware',
    'django.middleware.common.CommonMiddleware',
    #'django.contrib.sessions.middleware.SessionMiddleware',
    #'django.contrib.auth.middleware.AuthenticationMiddleware',
    #'django.middleware.doc.XViewMiddleware',
    'appengine_utilities.django-middleware.middleware.SessionMiddleware',
    'common.auth.AuthMiddleware',
)

ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    ROOT_PATH + '/templates',
)

INSTALLED_APPS = (
    'common',
    'admin',
)

